package cn.com.headfree.file.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.headfree.file.dao.IFileDao;
import cn.com.headfree.file.service.IFileService;
import cn.com.headfree.vo.file.DealFileVo;


@Service("fileService")
public class FileServiceImpl implements IFileService {
	@Autowired
	private IFileDao fileDao;
	@Override
	public void addFile(List<DealFileVo> files) {
		for(DealFileVo f:files) {
			fileDao.addFile(f);
		}
	}
	@Override
	public void deleteFileByBusinessId(String orignalId) {
		fileDao.deleteFileByBusinessId(orignalId);
	}
	@Override
	public List<DealFileVo> getFilesByBusinessId(String businessId) {
		return fileDao.getFilesByBusinessId(businessId);
	}

}
